d->id = dom_id;
ed->processor = cpu;
- d->create_time = NOW();
spin_lock_init(&d->time_lock);
}
-/* Return the most recently created domain. */
-struct domain *find_last_domain(void)
-{
- struct domain *d, *dlast;
-
- read_lock(&domlist_lock);
- dlast = domain_list;
- d = dlast->next_list;
- while ( d != NULL )
- {
- if ( d->create_time > dlast->create_time )
- dlast = d;
- d = d->next_list;
- }
- if ( !get_domain(dlast) )
- dlast = NULL;
- read_unlock(&domlist_lock);
-
- return dlast;
-}
-
-
#ifndef CONFIG_IA64
extern void physdev_destroy_state(struct domain *d);
#else
raise_softirq(SCHEDULE_SOFTIRQ);
}
+
unsigned int alloc_new_dom_mem(struct domain *d, unsigned int kbytes)
{
unsigned int alloc_pfns, nr_pages;
sched_add_domain(ed);
- if ( (rc = arch_set_info_guest(ed, c)) != 0 ) {
+ if ( (rc = arch_set_info_guest(ed, c)) != 0 )
+ {
sched_rem_domain(ed);
goto out;
}
struct domain
{
domid_t id;
- s_time_t create_time;
shared_info_t *shared_info; /* shared data area */
spinlock_t time_lock;
extern int set_info_guest(struct domain *d, dom0_setdomaininfo_t *);
struct domain *find_domain_by_id(domid_t dom);
-struct domain *find_last_domain(void);
extern void domain_destruct(struct domain *d);
extern void domain_kill(struct domain *d);
extern void domain_shutdown(u8 reason);
#include <xen/slab.h>
#include <xen/domain.h>
-
#endif /* __SCHED_H__ */
/*